import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import '@/styles/index.scss'
import '@/icons'
import MyWangEditor from '@/components/MyWangEditor/index.vue'
import ImageAvatar from "@/components/Upload/ImageAvatar.vue";
import ImageOne from "@/components/Upload/ImageOne.vue";
import ImageUpload from "@/components/Upload/ImageUpload.vue";
import FileUpload from "@/components/Upload/FileUpload.vue";
import ElKey from '@/components/elkey/index.vue'
import request from '@/utils/request'
import {getToken} from "@/utils/auth";

Vue.component('my-wang-editor', MyWangEditor)
Vue.component('image-avatar', ImageAvatar)
Vue.component('image-one', ImageOne)
Vue.component('image-upload', ImageUpload)
Vue.component('file-upload', FileUpload)
Vue.component('el-key', ElKey)

Object.assign(Vue.prototype, {
  $baseServer: process.env.VUE_APP_BASE_API,
  $request: request,
  $store: {getters: {headerToken: {UserJwtToken: getToken()}}}
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
